From: Robert Lipe Date: Fri, 30 Dec 2016 00:11:47 +0000 (-0600) Subject: Modernize OS support, eliminate a server-side redirect for most fetches. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~9^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=545e965a6ddde542e3372b7ffef0b079662ce18a;p=gpsbabel.git Modernize OS support, eliminate a server-side redirect for most fetches. --- diff --git a/gui/donate.cc b/gui/donate.cc index 32e072f29..807635cba 100644 --- a/gui/donate.cc +++ b/gui/donate.cc @@ -32,6 +32,6 @@ Donate::Donate(QWidget *parent) : QDialog(parent) void Donate::contributeClicked() { - QDesktopServices::openUrl(QUrl("http://www.gpsbabel.org/contribute.html")); + QDesktopServices::openUrl(QUrl("https://www.gpsbabel.org/contribute.html")); close(); } diff --git a/gui/donate.ui b/gui/donate.ui index 2fae6ead2..3377303c5 100644 --- a/gui/donate.ui +++ b/gui/donate.ui @@ -48,7 +48,7 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">GPSBabel is free software built and supported by volunteers. It consumes vast amounts of time to create and support the software as well as money for mapping programs, GPS receivers, and development fixtures. Please see how you can <a href="http://www.gpsbabel.org"><span style=" text-decoration: underline; color:#0000ff;">contribute time or via PayPal (no account needed) or Google Checkout.</span></a></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">GPSBabel is free software built and supported by volunteers. It consumes vast amounts of time to create and support the software as well as money for mapping programs, GPS receivers, and development fixtures. Please see how you can <a href="https://www.gpsbabel.org"><span style=" text-decoration: underline; color:#0000ff;">contribute time or via PayPal (no account needed).</span></a></p></body></html> true diff --git a/gui/mainwindow.cc b/gui/mainwindow.cc index 337b2bcb9..a649e3e79 100644 --- a/gui/mainwindow.cc +++ b/gui/mainwindow.cc @@ -1028,7 +1028,8 @@ void MainWindow::closeActionX() babelData_.runCount_++; QDateTime now = QDateTime::currentDateTime(); - if ((babelData_.runCount_ > 5) && (babelData_.donateSplashed_.daysTo(now) > 30)) { + if ((babelData_.runCount_ == 1) || + (babelData_.runCount_ > 5) && (babelData_.donateSplashed_.daysTo(now) > 30)) { Donate donate(0); if (babelData_.donateSplashed_.date() == QDate(2010,1,1)) donate.showNever(false); @@ -1050,7 +1051,7 @@ void MainWindow::closeEvent(QCloseEvent*) //------------------------------------------------------------------------ void MainWindow::donateActionX() { - QDesktopServices::openUrl(QString("http://www.gpsbabel.org/contribute.html?gbversion=" VERSION)); + QDesktopServices::openUrl(QString("https://www.gpsbabel.org/contribute.html?gbversion=" VERSION)); } //------------------------------------------------------------------------ diff --git a/gui/upgrade.cc b/gui/upgrade.cc index fa5cef402..08d70d8b1 100644 --- a/gui/upgrade.cc +++ b/gui/upgrade.cc @@ -57,7 +57,7 @@ UpgradeCheck::UpgradeCheck(QWidget *parent, QList &formatList, QObject(parent), manager_(0), replyId_(0), - upgradeUrl_(QUrl("http://www.gpsbabel.org/upgrade_check.html")), + upgradeUrl_(QUrl("https://www.gpsbabel.org/upgrade_check.html")), formatList_(formatList), updateStatus_(updateUnknown), babelData_(bd) @@ -108,10 +108,12 @@ QString UpgradeCheck::getOsVersion() case QSysInfo::MV_10_8: return "10.8"; break; // Mountain Lion case QSysInfo::MV_10_9: return "10.9"; break; // Mavericks case QSysInfo::MV_10_10: return "10.10"; break; // Yosemite + case QSysInfo::MV_10_11: return "10.11"; break; // El Capitan + case QSysInfo::MV_10_12: return "10.12"; break; // Sierra default: // This probably doesn't work... - if (QSysInfo::MacintoshVersion == 0x000D) { - return "10.11"; + if (QSysInfo::MacintoshVersion == 0x000E) { + return "10.13"; break; } return QString("Unknown Mac %1").arg(QSysInfo::MacintoshVersion); @@ -130,6 +132,9 @@ QString UpgradeCheck::getOsVersion() case QSysInfo::WV_5_2: return "2003"; break; case QSysInfo::WV_6_0: return "Vista"; break; case QSysInfo::WV_6_1: return "7"; break; + case QSysInfo::WV_6_2: return "8"; break; + case QSysInfo::WV_6_3: return "8.1"; break; + case QSysInfo::WV_10_0: return "10"; break; default: if (QSysInfo::WindowsVersion == 0x00a0) return "8"; if (QSysInfo::WindowsVersion == 0x00b0) return "8.1"; @@ -307,10 +312,9 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply) for (int i = 0; i < upgrades.length(); i++) { QDomNode upgradeNode = upgrades.item(i); QDomElement upgrade = upgradeNode.toElement(); - QString updateVersion = upgrade.attribute("version"); if (upgrade.attribute("downloadURL").isEmpty()) { - downloadUrl = "http://www.gpsbabel.org/download.html"; + downloadUrl = "https://www.gpsbabel.org/download.html"; } else { downloadUrl = upgrade.attribute("downloadURL"); } @@ -344,6 +348,7 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply) information.setText(response); information.setInformativeText(tr("Do you wish to download an upgrade?")); + // The text field can be RichText, but DetailedText can't be. Odd. information.setDetailedText(upgradeText); switch (information.exec()) {